import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
          {
    path: "/index",
    component: () => import("../views/index.vue"),
    name: "index"
  },
  {
    path: "/course",
    component: () => import("../views/course.vue"),
    name: "course"
  },
  {
    path: "/practice",
    component: () => import("../views/practice.vue"),
    name: "practice"
  },
  {
    path: "/record",
    component: () => import("../views/record.vue"),
    name: "record"
  },
  {
    path: "/setinfo",
    component: () => import("../views/setinfo.vue"),
    name: "setinfo"
  },
  {
    path: "/user",
    component: () => import("../views/user.vue"),
    name: "user",
    children: [
      {
        path: "userindex",
        component: () => import("../components/mine/index.vue"),
        name: "userindex"
      }
    ]
  },
  {
    path: "/custmoer",
    component: () => import("../views/custmoer.vue"),
    name: "custmoer"
  },
  {
    path: "/smslogin",
    component: () => import("../views/smslogin.vue"),
    name: "smslogin"
  },
  {
    path: "/login",
    component: () => import("../views/login.vue"),
    name: "login"
  },
  {
    path: "/detail",
    component: () => import("../views/detail.vue"),
    name: "detail"
  },
  {
    path: "/info",
    component: () => import("../components/mine/info.vue"),
    name: "info"
  },
  {
    path: "/teach",
    component: () => import("../views/teach.vue"),
    name: "teach"
  },
  {
    path: "/concern",
    component: () => import("../views/concern.vue"),
    name: "concern"
  },
  {
    path: "/setpassword",
    component: () => import("../views/setpassword.vue"),
    name: "setpassword"
  },
  {
    path: "/setinfoy",
    component: () => import("../views/setinfoy.vue"),
    name: "setinfoy"
  },
  {
    path: "/options",
    component: () => import("../views/options.vue"),
    name: "options"
  },
  {
    path: "/search",
    component: () => import("../views/search.vue"),
    name: "search"
  },
  {
    path: "/calendar",
    component: () => import("../views/calendar.vue"),
    name: "calendar"
  },
  {
    path: "/cdetail",
    component: () => import("../views/cdetail.vue"),
    name: "cdetail"
  },
  {
    path: "/month",
    component: () => import("../views/month.vue"),
    name: "month"
  },
  {
    path: "/",
    redirect: "/index"
  }
     ]
})

export default router


